<!DOCTYPE html PUBLIC 
    "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
<html 
	xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:ui="http://java.sun.com/jsf/facelets" 
	xmlns:h="http://java.sun.com/jsf/html" 
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:t="http://myfaces.apache.org/tomahawk"> 

	<ui:component>
		<h:panelGroup id="sendMessagePanel" rendered="#{brokerBean.sendView}">	
		<table class="results" id="MQ_send_message">
			<thead>
				<tr>
					<th colspan="2"><h:outputText value="#{msgs['mq.content.send.title']}" /></th>
				</tr>								
				<tr>
					<h:panelGroup rendered="#{brokerBean.started}">
						<td colspan="2">
							<h:outputText value="#{msgs['mq.content.send.subtitle']}" />
						</td>
					</h:panelGroup>
					<h:panelGroup rendered="#{!brokerBean.started}">					
						<td colspan="2">
							<h:outputText value="#{msgs['general.notavailable']}" />
						</td>
				</h:panelGroup>
				</tr>
				<tr>
					<td colspan="2" class="message">
						<h:outputText value="#{brokerSendMessageActionHandler.message}"/>					
					</td>
				</tr>				
			</thead>	
			<h:panelGroup rendered="#{brokerBean.started}">
			<tbody class="results">
				<h:form id="sendForm">
				<tr class="cells">
					<td width="150px"><h:outputText value="#{msgs['mq.content.send.defaultdestination']}"/></td>
					<td><h:selectBooleanCheckbox id="cb_defdest" value="#{brokerSendMessageActionHandler.defaultDestination}" checked="true" onclick="fDefaultDestination()"/></td>
				</tr>								
				<tr class="cells">
					<td width="150px"><h:outputText value="#{msgs['mq.content.send.otherdestination']}"/></td>
					<td><h:inputText id="otherDest" type="text" value="#{brokerSendMessageActionHandler.otherDestination}" onclick="fOtherDestination()"/></td>
				</tr>							
				<tr class="cells">
					<td width="150px"><h:outputText value="#{msgs['mq.content.send.type']}"/></td>
					<td>
						<h:selectBooleanCheckbox id="cb_queue" value="#{brokerSendMessageActionHandler.isQueue}" onclick="cbQueueSelected()"/>
						<h:outputText value="#{msgs['mq.content.send.queue']}"/>
						<h:selectBooleanCheckbox id="cb_topic" value="#{brokerSendMessageActionHandler.isTopic}" onclick="cbTopicSelected()"/>
						<h:outputText value="#{msgs['mq.content.send.topic']}"/>		
					</td>
				</tr>							
				<tr class="cells">
					<td width="150px"><h:outputText value="#{msgs['mq.content.send.payload']}"/></td>
					<td><h:inputTextarea width="100%" id="payload" type="text" value="#{brokerSendMessageActionHandler.payload}"/></td>
				</tr>
				<tr class="even">
					<td colspan="2" align="right">
						<h:commandButton value="#{msgs['mq.content.send.send']}" action="#{brokerSendMessageActionHandler.sendMessage}"/>
					</td>
				</tr>
				</h:form>
			</tbody>
			</h:panelGroup>	
		</table>
		<br/>
		<br/>
		</h:panelGroup>
	</ui:component>

</html>